import request from '@/utils/request'

export const login = data => {
  return request.post('/sys/login', data)
}

export const getInfo = token => {
  return request.post('/sys/profile')
}

export const getInfoDetail = (id) => {
  return request.get(`/sys/user/${id}`)
}

/**
 * @description: 保存员工信息
 * @param {*} data
 * @return {*}
 */
export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}

export const logout = () => {

}
